In the case where the active layer of a thin film transistor is irradiated by light, photocarriers in the active layer increases and results in an increased leakage current of the thin film transistor. To avoid the above phenomenon, a light-shielding layer is generally provided in the thin film transistor to prevent the light from being irradiated onto the active layer. However, in the case where the light-shielding layer is formed of a metal material, a parasitic capacitance is generated between the light-shielding layer and the active layer. This parasitic capacitance causes the leakage current of the thin film transistor to increase and affects the electrical properties of the thin film transistor.